<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="TPSHOP v1.1" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="applicable-device" content="mobile">
<title><?php echo ($tpshop_config['shop_info_store_title']); ?></title>
<meta http-equiv="keywords" content="<?php echo ($tpshop_config['shop_info_store_keyword']); ?>" />
<meta name="description" content="<?php echo ($tpshop_config['shop_info_store_desc']); ?>" />
<link rel="stylesheet" href="/Template/mobile/new/Static/css/iconfont/iconfont.css">
<?php if($is_ios != ''): ?><div style="margin:0 auto;padding:4px 0;width:100%;background: #3cca36; color:#fff;">
        <?php if($_GET[act] != 1): ?><a href="javascript:history.go(-1)" style="font-size:14px;color:#fff;"><img src="/Template/mobile/new/Static/images/back.png" style="vertical-align: middle;" width="16"   />返回 </a><?php endif; ?>
        <div style="float:right;font-size:12px;margin-right:5px;"><a href="<?php echo U('Mobile/Index/index');?>" style="color:#fff;"><i class="icon iconfont icon-shouye" style="margin-right:4px;"></i>首页</a></div>
    </div><?php endif; ?>
<link rel="stylesheet" href="/Template/mobile/new/Static/css/public.css">
<link rel="stylesheet" href="/Template/mobile/new/Static/css/user.css">
<script type="text/javascript" src="/Template/mobile/new/Static/js/jquery.js"></script>
<script src="/Public/js/global.js"></script>
<script src="/Public/js/mobile_common.js"></script>
<script type="text/javascript" src="/Template/mobile/new/Static/js/modernizr.js"></script>
<script type="text/javascript" src="/Template/mobile/new/Static/js/layer.js" ></script>
</head>

<link rel="stylesheet" type="text/css" href="/Template/mobile/new/Static/css/coach.css"/>
<body style="background: #f5f5f5;">


<script type="text/javascript" src="/Template/mobile/new/Static/js/mobile.js" ></script>
<div class="goods_nav hid" id="menu">
      <div class="Triangle">
        <h2></h2>
      </div>
      <ul>
        <li><a href="<?php echo U('Index/index');?>"><span class="menu1"></span><i>首页</i></a></li>
        <li><a href="<?php echo U('Goods/categoryList');?>"><span class="menu2"></span><i>分类</i></a></li>
        <li><a href="<?php echo U('Cart/cart');?>"><span class="menu3"></span><i>购物车</i></a></li>
        <li style=" border:0;"><a href="<?php echo U('User/index');?>"><span class="menu4"></span><i>我的</i></a></li>
   </ul>
 </div> 

<form action="<?php echo U('Mobile/order_list/ajax_order_list');?>" name="filter_form" id="filter_form">
<?php if(empty($lists)): ?><section id="cart-content">
      <div class="qb_tac" style="padding:100px 0 30px">
        <img src="/Template/mobile/new/Static/images/flow/empty_cart.png" width="170" >
        <br>暂无练炼</div>
      <div class="qb_gap" style="width:60%; margin:0 auto;">
        <a href="<?php echo U('Goods/categoryList');?>" class="mod_btn btn_strong"><i class="icon iconfont icon-paobu fontbao"></i>去商城逛逛</a>
      </div>
</section><?php endif; ?>
      
      <div id="coach_list">
	   <?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$list): $mod = ($i % 2 );++$i;?><div class="list_img"><a href="<?php echo U('coach_detail',array('coach_id'=>$list[id],cate_id=>$cate_id));?>"><img src="<?php echo ($list["images"]); ?>" ></a></div><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
</form>



<div class="v_nav">
	<div class="vf_nav">
		<ul>

			<li> <a href="<?php echo U('Mobile/Index/index');?>" <?php if($navid == 'home'): ?>class="act"<?php endif; ?> >
			    <i class="icon iconfont icon-shouye"></i>
			    <span>首页</span></a></li>

           	<?php if($_SESSION[is_coach]!=1){ ?>
                <li><a href="<?php echo U('Goods/categoryList');?>" <?php if($navid == 'shop'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-paobu fontbao"></i>
                    <span>商城</span></a></li>
                    
                <li><a href="<?php echo U('Coach/coach_list');?>" <?php if($navid == 'coach'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-juzhong"></i>
                    <span>教练</span></a></li>
                <li><a href="<?php echo U('Cart/cart');?>" <?php if($navid == 'cart'): ?>class="act"<?php endif; ?> >
                    <i class="icon iconfont icon-gouwuche fontshop"></i>
                    <span>购物车</span></a></li>
            <?php } ?>
           
			<!--<li>-->
			<!--<a href="<?php echo U('Cart/cart');?>">-->
			   <!--<em class="global-nav__nav-shop-cart-num" id="cart_quantity" style="right:9px;"></em>-->
			   <!--<i class="vf_4"></i>-->
			   <!--<span>购物车</span>-->
			   <!--</a>-->
			<!--</li>-->
			<?php if($_SESSION['is_coach']){ ?>
			<li><a href="<?php echo U('Yuyue/coach_detail');?>" <?php if($navid == 'yuyue'): ?>class="act"<?php endif; ?> >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<?php }else{ ?>
			<li style="display:none;"><a href="<?php echo U('Yuyue/coach_list');?>" <?php if($navid == 'yuyue'): ?>class="act"<?php endif; ?>  >
			    <i class="icon iconfont icon-calendar"></i>
				<span>预约</span></a>
			</li>
			<?php } ?>


			<!--<li><a href="<?php echo U('Yuyue/coach_list');?>">-->
				<!--<i class="vf_5"></i>-->
				<!--<span>预约</span></a>-->
			<!--</li>-->
			<li><a href="<?php echo U('User/index');?>" <?php if($navid == 'user'): ?>class="act"<?php endif; ?>>
			    <i class="icon iconfont icon-gerenzhongxin"></i>
			    <span>我的</span></a>
			</li>
		</ul>
	</div>
</div> 
<script type="text/javascript">
$(document).ready(function(){
	  var cart_cn = getCookie('cn');
	  if(cart_cn == ''){
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
				cart_cn = getCookie('cn');
				$('#cart_quantity').html(cart_cn);						
			}
		});	
	  }
	  $('#cart_quantity').html(cart_cn);
});
</script>

<?php if($_GET[act] == 1): ?><script>
    XBack = {};

    (function(XBack) {
        XBack.STATE = 'x - back';
        XBack.element;

        XBack.onPopState = function(event) {
            event.state === XBack.STATE && XBack.fire();
            XBack.record(XBack.STATE); //初始化事件时，push一下
        };

        XBack.record = function(state) {
            history.pushState(state, null, location.href);
        };

        XBack.fire = function() {
            var event = document.createEvent('Events');
            event.initEvent(XBack.STATE, false, false);
            XBack.element.dispatchEvent(event);
        };

        XBack.listen = function(listener) {
            XBack.element.addEventListener(XBack.STATE, listener, false);
        };

        XBack.init = function() {
            XBack.element = document.createElement('span');
            window.addEventListener('popstate', XBack.onPopState);
            XBack.record(XBack.STATE);
        };

    })(XBack); // 引入这段js文件

    XBack.init();
    XBack.listen(function() {});
</script><?php endif; ?>
<!-- 微信浏览器 调用微信 分享js-->
<?php if($signPackage != null): endif; ?>
<!-- 微信浏览器 调用微信 分享js  end-->
</body>
</html>